package com.aihna.mall.domain.bo;

import com.aihna.mall.domain.StoreUserIntegralRecord;
import com.aihna.common.core.validate.AddGroup;
import com.aihna.common.core.validate.EditGroup;
import com.aihna.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 用户积分记录业务对象 vvl_store_user_integral_record
 *
 * @author Joseph.Chen
 * @date 2024-04-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = StoreUserIntegralRecord.class, reverseConvertGenerate = false)
public class StoreUserIntegralRecordBo extends BaseEntity {

    /**
     * 记录id
     */
    @NotNull(message = "记录id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户uid
     */
    @NotNull(message = "用户uid不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long uid;

    /**
     * 关联id-orderNo,(sign,system默认为0）
     */
    @NotBlank(message = "关联id-orderNo,(sign,system默认为0）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String linkId;

    /**
     * 关联类型（order,sign,system）
     */
    @NotBlank(message = "关联类型（order,sign,system）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String linkType;

    /**
     * 类型：1-增加，2-扣减
     */
    @NotNull(message = "类型：1-增加，2-扣减不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer type;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 积分
     */
    @NotNull(message = "积分不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer integral;

    /**
     * 剩余
     */
    @NotNull(message = "剩余不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer balance;

    /**
     * 备注
     */
    private String mark;

    /**
     * 状态：1-订单创建，2-冻结期，3-完成，4-失效（订单退款）
     */
    private Integer status;

    /**
     * 冻结期时间（天）
     */
    @NotNull(message = "冻结期时间（天）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer frozenTime;

    /**
     * 解冻时间
     */
    @NotNull(message = "解冻时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long thawTime;


}
